<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
</head>
<body>
<h3>账户列表</h3>
<div>
    <table>
        <tr>
            <th>账户名称</th>
            <th>账户余额</th>
        </tr>
        <c:forEach items="${pageInfo.list}" var="account">
            <tr>
                <td>${account.name}</td>
                <td>${account.balance}</td>
            </tr>
        </c:forEach>
    </table>
</div>
<div>
    <span><a href="queryAllAccount?pageNum=1">首页</a></span>
    <c:if test="${pageInfo.isFirstPage}">
        <span>上一页</span>
    </c:if>
    <c:if test="${!pageInfo.isFirstPage}">
        <span><a href="queryAllAccount?pageNum=${pageInfo.pageNum - 1}=">上一页</a></span>
    </c:if>
    <c:if test="${pageInfo.isLastPage}">
        <span>下一页</span>
    </c:if>
    <c:if test="${!pageInfo.isLastPage}">
        <span><a href="queryAllAccount?pageNum=${pageInfo.pageNum + 1}">下一页</a></span>
    </c:if>
    <span><a href="queryAllAccount?pageNum=${pageInfo.pages}">尾页</a></span>
    <span>总共${pageInfo.total}条数据</span>
    <span>每页${pageInfo.pageSize}条</span>
    <span>${pageInfo.pageNum}/${pageInfo.pages}</span>
</div>
</body>
</html>
